import { http } from '@/utils/http'
import type { OrderSuccess, OrderQuery, createOrderType } from '@/types/orderList'

export const getOrderAPI = (data : OrderQuery) => {
	return http<OrderSuccess[]>({
		method: 'POST',
		url: '/apiDev/OrderList',
		data
	})
}
// 创建订单
export const createOrder = (data : createOrderType) => {
	return http({
		method: 'POST',
		url: '/api/server/order/createOrder',
		data
	})
}
// 订单支付
export const paymentOrder = (data : AnyFunction) => {
	return http({
		method: 'POST',
		url: '/api/server/order/payOrder',
		data
	})
}